package park

import (
	"time"
)

type ParkingLotStruct struct {
	Id            int       `gorm:"column:id" json:"id" `
	MuchId        string    `json:"much_id" form:"much_id"`
	ParkCode      string    `json:"park_code" form:"park_code"`
	Name          string    `json:"name" form:"name"`
	Address       string    `json:"address" form:"address"`
	ParkingNumber int       `json:"parking_number" form:"parking_number"`
	StopType      string    `json:"stop_type" form:"stop_type"`
	Longitude     float64   `json:"longitude" form:"longitude"`
	Latitude      float64   `json:"latitude" form:"latitude"`
	State         int       `json:"state" form:"state"`
	Sort          int       `json:"sort" form:"sort"`
	Clicks        int       `json:"clicks" form:"clicks"`
	RegionCode    string    `json:"region_code" form:"region_code"`
	RegionName    string    `json:"region_name" form:"region_name"`
	ParkCity      string    `json:"park_city" form:"park_city"`
	PType         int       `json:"p_type" form:"p_type"`
	MTime         string    `json:"m_time" form:"m_time"`
	Distance      int       `json:"distance" form:"-" gorm:"-"`
	FreeMinutes   int       `json:"free_minutes" form:"free_minutes"`
	CreatedAt     time.Time `gorm:"type:datetime"`
	UpdatedAt     time.Time `gorm:"type:datetime"`
}

func (c *ParkingLotStruct) TableName() string {
	return "parking_lot"
}
